
.chat-message {
  display: flex;
  flex-direction: row;

  &:last-child {
    animation: slide-in ease 0.3s;
  }

  &:hover {
    .chat-message-actions {
      opacity: 1;
      transform: translateY(0px);
      max-width: 100%;
      height: 40px;
    }

    .chat-message-action-date {
      opacity: 0.2;
    }
  }
}

.chat-message-user {
  display: flex;
  flex-direction: row-reverse;
}

.chat-message-container {
  max-width: var(--message-max-width);
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  &:hover {
    .chat-message-edit {
      opacity: 0.9;
    }
  }
}

.chat-message-user > .chat-message-container {
  align-items: flex-end;
}

.chat-message-user {
  .chat-message-header {
    flex-direction: row-reverse;
  }
}

.chat-message-header {
  display: flex;
}

.chat-message-avatar {
  // margin-top: 20px;
  // position: relative;
}

.chat-message-user {
  .chat-message-edit {
    margin-right: 8px;
  }
}

.chat-message-edit {
  // position: absolute;
  // height: 100%;
  // width: 100%;
  // top: 0;
  margin-left: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all ease 0.3s;

  button {
    padding: 7px;
  }
}

.chat-message-status {
  font-size: 12px;
  color: #aaa;
  line-height: 1.5;
  margin-top: 5px;
}

.chat-message-item {
  box-sizing: border-box;
  max-width: 100%;
  margin-top: 10px;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 10px;
  font-size: 14px;
  user-select: text;
  word-break: break-word;
  position: relative;
  transition: all ease 0.3s;

  .chat-message-actions {
    display: flex;
    box-sizing: border-box;
    font-size: 12px;
    align-items: flex-end;
    justify-content: space-between;
    transition: all ease 0.3s 0.15s;
    transform: translateX(-5px) scale(0.9) translateY(30px);
    opacity: 0;
    height: 0;
    max-width: 0;
    position: absolute;
    left: 0;
    z-index: 2;

    .chat-input-actions {
      display: flex;
      flex-wrap: nowrap;
    }
  }
}

.chat-message-user > .chat-message-container > .chat-message-item {
  background-color: #e8faff;

  &:hover {
    min-width: 0;
  }
}

.date {
  opacity: 0.4;
  font-size: 12px;
  margin-top: 4px;
}
